import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/vue-element-admin/article/list',
    method: 'get',
    params: query
  })
}

export function fetchArticle(id) {
  return request({
    url: '/vue-element-admin/article/detail',
    method: 'get',
    params: { id }
  })
}

export function fetchPv(pv) {
  return request({
    url: '/vue-element-admin/article/pv',
    method: 'get',
    params: { pv }
  })
}

export function createArticle(data) {
  return request({
    url: '/vue-element-admin/article/create',
    method: 'post',
    data
  })
}

export function updateArticle(data) {
  return request({
    url: '/vue-element-admin/article/update',
    method: 'post',
    data
  })
}

// 投稿总次数
export function statistics4(query) {
  return request({
    url: '/contentApi/statistics4',
    method: 'get',
    params: query
  })
}

// 通过投稿次数
export function statistics5(query) {
  return request({
    url: '/contentApi/statistics5',
    method: 'get',
    params: query
  })
}


// 上稿率
export function statistics3(query) {
  return request({
    url: '/contentApi/statistics3',
    method: 'get',
    params: query
  })
}

